{# A deploy job (overseer_deploy_actions.job_context), streamed while the page is open. Whole (Jobs, New server): where its steps stand (its step bar), what it is doing, how it ended, and its output's tail, folded. On a card: only that one runs, with a link to it (the card's controls hide meanwhile, input.css). A provision that stopped part way offers, on both, to resume it or destroy what it made. #} {% from "components/macros/layout.html" import copy_button, progress %} {% from "pages/overseer/deployments/_macros.html" import fold, goto, stopped %} {% if job %} {% set whole = job.whole %}
{% if job.status == "running" and not whole %}{% endif %} {{ job.title }} {% if job.status == "running" %}{{ job.label if whole else "running" }} {% elif job.status == "failed" %}{{ job.error }} {% else %}Done{% endif %} {% if job.url and not whole %}{{ goto(job.url, "Open", "data-job-link") }}{% endif %}
{% endif %} {% if job.stopped %}{{ stopped(job.partials, job.stopped) }}{% endif %} {# Folded; open stays open across the stream's swaps (job_panel's ``output``), and each swap shows its newest line (reversed, the box starts at its bottom). Its scrollbar always shows (daisyUI's ``scrollbar-color`` on every element would hide a styled one), and its scrolling stays in it. #} {% if whole and job.lines %} {% set attrs %}data-output x-bind:open="output" x-on:toggle="output = $el.open"{% endset %} {% call fold("Show output", attrs) %}{{ job.lines|join("\n") }}
{% endcall %}
{% endif %}